package com.chisheng.read;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.chisheng.pojo.Student;

import java.util.Map;

/**
 * 读取监听器
 *
 * @author chisheng
 * @since 2021-10-28
 */
public class ExcelReadListener extends AnalysisEventListener<Student> {

    @Override
    public void invoke(Student data, AnalysisContext context) {
        System.out.println(data);
    }

    @Override
    public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) {
        System.out.println(headMap);
        super.invokeHeadMap(headMap, context);
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext context) {

    }

}
